package ckw.database;

import java.io.Serializable;

import core.modules.database.SuperOKWElectionResult;

public class OKWElectionResult extends SuperOKWElectionResult implements Serializable {

	private static final long serialVersionUID = 6981017028404947250L;

	private SummaryPackage summaryPackage;
	
	public OKWElectionResult() {
		super();
	}

	public OKWElectionResult(Long ckwVotingSubcardOption, int votesNumber) {
		super(ckwVotingSubcardOption, votesNumber);
	}

	public SummaryPackage getSummaryPackage() {
		return summaryPackage;
	}

	public void setSummaryPackage(SummaryPackage summaryPackage) {
		this.summaryPackage = summaryPackage;
	}
	
	public void addToSummaryPackage(SummaryPackage summaryPackage) {
		setSummaryPackage(summaryPackage);
		summaryPackage.getOkwElectionResults().add(this);
	}
	
	public void removeFromSummaryPackage(SummaryPackage summaryPackage){
		setSummaryPackage(null);
		summaryPackage.getOkwElectionResults().remove(this);
	}
}
